#ifndef NMEA0183_H
#define NMEA0183_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum NMEA0183Address{
    NMEA_GGA = 0,
    NMEA_RMC = 1,
    NMEA_GLL = 2,
    NMEA_ZDA = 3,
    NMEA_WPL = 4,
    NMEA_BWC = 5,
    NMEA_BWR = 6,
    NMEA_GNS = 7,
    NMEA_RMB = 8,
    NMEA_VTG = 9,
    NMEA_HDT = 10,
    NMEA_HDM = 11,
    NMEA_ROT = 12,
    NMEA_HDG = 13,
    NMEA_HTC = 14,
    NMEA_HTD = 15,
    NMEA_STW = 16,
    NMEA_SOG = 17,
    NMEA_VBW = 18,
    NMEA_VHW = 19,
    NMEA_VLW = 20,
    NMEA_MWD = 21,
    NMEA_MWV = 22,
    NMEA_VWR = 23,
    NMEA_VWT = 24,
    NMEA_DPT = 25,
    NMEA_DBT = 26,
    NMEA_DBS = 27,
    NMEA_DBK = 28,
    NMEA_RPM = 29,
    NMEA_XDR = 30,
    NMEA_MDA = 31,
}NMEA0183Address_t;

typedef enum NMEA0183_Validity{
    NMEA0183_Invalid = 0,
    NMEA0183_Valid,
}NMEA0183_Validity_t;

typedef struct ShipInformation {
    struct {
        double latitude;
        double longitude;
        double altitude;
        NMEA0183_Validity_t validity;
    }gnss_information;
    struct {
        double sog;
        double sog_kph;
        double cog;
        NMEA0183_Validity_t validity;
    }navigation_information;
}ShipInformation_t;

void NMEA0183_init(ShipInformation_t *ship);
void NMEA0183_parse(ShipInformation_t *ship,char *message);
void NMEA0183_setAddressEnable(NMEA0183Address_t address,int enable);

#ifdef __cplusplus
}
#endif

#endif
